﻿using System;
using System.Web.UI;

namespace NJCORS
{
    public partial class Header : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            //Model.SessUserInfo newwb = (Model.SessUserInfo)Session["CurUser"];
            //if (newwb != null)
            //{
            //    UserName.InnerHtml = newwb.WebUserName;
            //    txtunitname.InnerHtml = newwb.UnitName;
            //    txtdepartname.InnerHtml = newwb.DepartmentName;
            //    BLL.RoleInfo bri = new BLL.RoleInfo();
            //    Model.RoleInfo mri = new Model.RoleInfo();
            //    mri = bri.GetModel(newwb.RoleId);
            //    rolename.InnerHtml = mri.RoleName;
            //    BLL.SysConfig bsc = new BLL.SysConfig();
            //    string strContent = bsc.GetValue("ImportantInfo").Trim();
            //    if ( strContent != "")
            //    {
            //        msg.InnerHtml = "<marquee width=200  scrollamount=3 bgcolor=ffaaaa onMouseOut=\"this.start()\" onMouseOver=\"this.stop()\">" + strContent + "</marquee>";
            //    }
            //    else
            //    {
            //        msg.InnerHtml = "";
            //    }
            //}
            //else
            //{
            //    Response.Write("<script  language= 'javascript'>parent.location.href='login.aspx';</script>");
            //}
        }


        protected void ImageButton1_Click(object sender, ImageClickEventArgs e)
        {
            //Session.Clear();
            //Session.Abandon();
            Response.Write("<script  language= 'javascript'>parent.location.href='login.aspx';</script>");
        }

        protected void ImageButton2_Click(object sender, ImageClickEventArgs e)
        {
            if (System.IO.File.Exists(AppDomain.CurrentDomain.BaseDirectory + "/temp/materials.rar"))
            {
                //Response.Redirect("~/handlers/handler_transdown.ashx?id=materials.rar");
            }
            //try
            //{
            //}
            //catch (System.Exception ex)
            //{
            //    Response.Redirect("Header.aspx");
            //}
        }
    }
}
